<template>
    <div>
        <a-card>
            <a-tabs :default-active-key="defaultActiveKey" lazy-load>
                <a-tab-pane v-for="item in webSetting" :key="item.id" :title="item.title">
                    <setForm :setting="item.setting" />
                </a-tab-pane>

                <a-tab-pane  title="新增" key="add">
                    <setAdd />
                </a-tab-pane>
            </a-tabs>
        </a-card>
    </div>
</template>

<script setup lang="ts">
import { getWebSetting } from '@/api/system/setting/web_setting'
import { useRequest } from 'vue-request';
import setForm from './components/form.vue'
import setAdd from './components/add.vue'
const defaultActiveKey = ref('add')

const { data: webSetting } = useRequest(getWebSetting, {
    onSuccess: (res) => {
        // defaultActiveKey.value = res[0].id
    }
})


</script>

<style scoped lang="scss">

</style>